const express=require("express");
const logger=require("morgan");
const bodyParser=require("body-parser");
const path=require("path");

const route=require("./routes/indexRouter");
const app=express();

app.use(logger("dev"));

app.use(bodyParser.urlencoded({limit:'50mb',extended:true}));
app.use(bodyParser.json({limit:'50mb'}));

app.use(route);

app.use(express.static(__dirname+"/public"));
app.use(express.static(__dirname+"/public/pages"));

app.set("port",8889);//端口
app.listen(8889,()=>{
    console.log("服务器已启动："+app.get("port"));
})